
<div>
<table width="320"  cellpadding="0" cellspacing="0" align="left" style="border-collapse:collapse;border:1px solid white;">
<tr>
<td valign="top">
<div class="Contentnr auto">
<style>
#msg_weibo {width:300px;height:186px;*height:186px;_height:170px;margin:10px auto 0;zoom:1; overflow:hidden;font-size:12px;line-height:20px;margin-bottom:4px;background:#ffffff;}
#msg_weibo a{margin-right:6px;color:#003C71;text-decoration:none;}
#msg_weibo a:hover{color:#c00;text-decoration:underline;}
#msg_weibo img{margin-top:2px;}
#msg_weibo span{color: #888;}
#msg_weibo div{padding:8px 0 11px 0 ;overflow:hidden;zoom:1;background:url(http://mat1.gtimg.com/worldcup/duanzi/duanz6.gif) left bottom repeat-x}
#msg_weibo span a{display:block;}
#msg_weibo img{float:left;width:50px; height:50px; padding:2px; border:#D6D6D6 1px solid;}
#msg_weibo p{float:left;width:295px; padding-left:5px; }
</style>
</head>
<body>
<div id="msg_weibo">
<div class="con"><p>
<a target="_blank">友情链接位置１</a>
</p></div>
<div class="con"><p>
<a target="_blank">友情链接位置２</a>
</p></div>
<div class="con"><p>
<a target="_blank">友情链接位置３</a>
</p></div>
<div class="con"><p>
<a target="_blank">友情链接位置４</a>
</p></div>
<div class="con"><p>
<a target="_blank">友情链接位置５</a>
</p></div>
<div class="con"><p>
<a target="_blank">友情链接位置６</a>
</p></div>

</div>
</div>
</td>
</tr>
</table>
<script language="javascript">
var $ = function (d){
typeof d == "string" &&(d = document.getElementById(d));
return $.fn.call(d);
};
$.fn = function (){
this.addEvent = function (sEventType,fnHandler){
if (this.addEventListener) {this.addEventListener(sEventType, fnHandler, false);}
else if (this.attachEvent) {this.attachEvent("on" + sEventType, fnHandler);}
else {this["on" + sEventType] = fnHandler;}
}
this.removeEvent = function (sEventType,fnHandler){
if (this.removeEventListener) {this.removeEventListener(sEventType, fnHandler, false);}
else if (this.detachEvent) {this.detachEvent("on" + sEventType, fnHandler);}
else { this["on" + sEventType] = null;}
}
return this;
};
var Class = {create: function() {return function() { this.initialize.apply(this, arguments); }}};
var Bind = function (obj,fun,arr){return function() {return fun.apply(obj,arr);}}
var Marquee = Class.create();
Marquee.prototype = {
initialize: function(id,name,out,speed) {
this.name = name;
this.box = $(id);
this.out  = 1;//滚动间隔时间,单位秒
this.speed = speed;
this.d = 1;
this.box.style.position = "relative";
this.box.scrollTop = 0;
var _li = this.box.firstChild;
while(typeof(_li.tagName)=="undefined")_li = _li.nextSibling;
this.lis = this.box.getElementsByTagName(_li.tagName);
this.len = this.lis.length;
for(var i=0;i<this.lis.length;i++){
var __li = document.createElement(_li.tagName);
__li.innerHTML = this.lis[i].innerHTML;
this.box.appendChild(__li);//cloneNode
if(this.lis[i].offsetTop>=this.box.offsetHeight)break;
}
this.Start();
this.box.addEvent("mouseover",Bind(this,function(){clearTimeout(this.timeout);},[]));
this.box.addEvent("mouseout",Bind(this,this.Start,[]));
},
Start:function (){
clearTimeout(this.timeout);
this.timeout = setTimeout(this.name+".Up()",this.out*1000)
},
Up:function(){
clearInterval(this.interval);
this.interval = setInterval(this.name+".Fun()",10);
},
Fun:function (){
this.box.scrollTop+=this.speed;
if(this.lis[this.d].offsetTop <= this.box.scrollTop){
clearInterval(this.interval);
this.box.scrollTop = this.lis[this.d].offsetTop;
this.Start();
this.d++;
}
if(this.d >= this.len + 1){
this.d = 1;
this.box.scrollTop = 0;
}
}
};
$(window).addEvent("load",function (){
marquee = new Marquee("msg_weibo","marquee",1,2);
});
</script>
</div>
